include "map_builder.lua"
include "trajectory_builder.lua"

options = {
  map_builder = MAP_BUILDER,
  trajectory_builder = TRAJECTORY_BUILDER,
  map_frame = "map",
  tracking_frame = "base_link",
  published_frame = "base_link",
  odom_frame = "odom",
  provide_odom_frame = true,
  publish_frame_projected_to_2d = false,
  use_pose_extrapolator = false,
  use_odometry = false,
  use_nav_sat = false,
  use_landmarks = false,
  num_laser_scans = 0,
  num_multi_echo_laser_scans = 1,
  num_subdivisions_per_laser_scan = 10,
  num_point_clouds = 0,
  lookup_transform_timeout_sec = 0.2,
  submap_publish_period_sec = 0.3,
  pose_publish_period_sec = 5e-3,
  trajectory_publish_period_sec = 30e-3,
  rangefinder_sampling_ratio = 1.,
  odometry_sampling_ratio = 1.,
  fixed_frame_pose_sampling_ratio = 1.,
  imu_sampling_ratio = 1.,
  landmarks_sampling_ratio = 1.,
  imu_noise_acc = 0.001,
  imu_noise_gyro = 0.001,
  imu_walk_acc = 0.001,
  imu_walk_gyro = 0.001,
  imu_frequency = 0.001,

  use_imu_optimize = false,
  use_imu_integrate = true,
  imu_opt_use_identity_information = true,
  optimizer_win_size = 10,
  closure_check_active = false,
  closure_check_socre_min = 127,
  closure_check_histogram_resolution = 45.0,
  closure_check_histogram_min_num = 3,
  closure_check_uncontinuous_min_num = 2,
  cacheSize = 10,
  motionSize = 6,
  hitRatio = 1.22,
  dynEnable = false,
  subpixelScale = 0.8,
  dynScaleStride = 0.01,
  dynScaleIterTimes = 3,
  dynValidMotionTimes = 4,
  dynDetectDistMax = 10.0,
  dynNearRadius = 0.3,
  dynNearNum = 10,

  imufilter_filterGyro = true,
  imufilter_intervalMax = 0.1,
  imufilter_threshAccHorizon = 0.1,
  imufilter_threshGyroHorizon = 0.1,
  imufilter_threshVerticalRatio  = 0.5,
}

MAP_BUILDER.use_trajectory_builder_2d = true
TRAJECTORY_BUILDER_2D.num_accumulated_range_data = 10

return options
